#!/usr/bin/env python

from staticpage_class import StaticPage

def init ( l, admin = 0 ):
	from liwe import parts
	l.layman.add_js ( "modules/staticpage/js/staticpage.js" )

	StaticPage ( l )

	l.layman.add_js_code ( "staticpage.init();" )

	if admin and int ( admin ):
		parts.add ( l.layman, [ "ext" ] )
		parts.add_wwl ( l.layman, [ "jconed" ] )
		l.layman.add_js ( "modules/staticpage/js/staticpage.admin.js" )
		l.layman.add_css ( "modules/staticpage/gfx/staticpage.admin.css" )
		l.layman.add_js_code ( "staticpage.admin.init();" )

	return ''

